package homework.work4;

import javax.imageio.metadata.IIOMetadataFormatImpl;

public class Main {
    public static void main(String[] args) {
        String s = "aba";
        //
        judegeRevers(s);
    }

    private static void judegeRevers(String s) {
        int len= s.length();
        for (int i = 0; i < len/2; i++) {
            if(s.charAt(i)!=(s.charAt(len-i-1))){
                System.out.println("这不是一个对称字符串");
                return ;
            }
        }
        System.out.println("这是一个对称字符串");
    }
}
